import YchConstant from "@/api/YchConstant"; //接口模块配置项
import { axios } from "@/utils/request"; //请求
const url_1 = "outside"
const responseType = "blob"

// ----------------------------预备审评员----------------------------
// 流程监控
export const flowJkPage = function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/flow-ybjcy/flowJkPage',
    params: params,
    method: "GET",
    url_1
  });
}

// 流程列表
export const flowJobPage = function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/flow-ybjcy/flowJobPage',
    params: params,
    method: "GET",
    url_1
  });
}

// 获取流程详情
export const queryJobByJobId = function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/flow-ybjcy/queryJobByJobId',
    params: params,
    method: "GET",
    url_1
  });
}

// 保存流程
export const saveFlow = function(data) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/flow-ybjcy/saveFlow',
    data: data,
    method: "post",
    url_1
  });
}

// 提交流程
export const submitFlow = function(data) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/flow-ybjcy/submitFlow',
    data: data,
    method: "post",
    url_1
  });
}

// 退回流程
export const returnUpperFlowJob = function(data) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/flow-ybjcy/returnUpperFlowJob',
    data: data,
    method: "post",
    url_1
  });
}


// 统计
export const queryYbjcyTjPageList = function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/flow-ybjcy/queryYbjcyTjPageList',
    params: params,
    method: "GET",
    url_1
  });
}

// 导出数据
export const exportRckpYbJbxxData = function (params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/flow-ybjcy/exportRckpYbJbxxData",
    method: "GET",
    params,
    responseType,
    url_1
  });
};

//打印查询
export const queryBatchYbjcyList = function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/flow-ybjcy/queryBatchYbjcyList',
    params: params,
    method: "GET",
    url_1
  });
}

export function getDictListByDictCode(data) {
  //console.log('字典传参',data)
  return axios({
    url: YchConstant.SPZX_SPCY + '/dict/getDictListByDictCode',
    method:'get' ,
    params:data,
    url_1:'outside'
  })
}

export const downMyQm = function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/myJbxx/downMyQm',
    params: params,
    method: "GET",
    responseType:"arraybuffer",
    url_1
  });
}

